Skip to content

Conversation

mootari
Copy link
Member

@mootari mootari commented Dec 11, 2024

Adds Event to the list of known globals.

Currently a cell that references the Event constructor will have Event declared as input:

function _1(md){return(
md`# Untitled`
)}

function _2(Event){return(
new Event("input")
)}

function _3(){return(
new CustomEvent("input")
)}

export default function define(runtime, observer) {
  const main = runtime.module();
  main.variable(observer()).define(["md"], _1);
  main.variable(observer()).define(["Event"], _2);
  main.variable(observer()).define(_3);
  return main;
}

@mootari mootari requested a review from mbostock December 11, 2024 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant